package com.example.demo.controller;

import com.example.demo.service.LevelService;
import com.example.demo.vo.LevelVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/level")
@Slf4j
public class LevelController {


    @Autowired
    private LevelService levelService;

    @PostMapping("/rate")
    public List<LevelVo> getLevelRate() {
        return levelService.getLevelList();
    }
}
